<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="lhz" uri="http://www.liuhuazhi.com/diancan" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../css/admin/user/userMange.css" />
<link rel="stylesheet" href="../css/ArrangeTable/ArrangeTable.css" />
<!-- 导航插件CSS样式 -->
<!-- <link rel="stylesheet" type="text/css" href="../css/admin/user/normalize.css" />
<link rel="stylesheet" type="text/css" href="../css/admin/user/default.css"> -->
<link rel="stylesheet" href="../css/admin/user/pagination.css" type="text/css">
<title>会员管理</title>
<body>
	<div class="head">
		<h4>用户管理</h4>
		<hr>
	</div>
	<div class="head_item">
		<div class="header">
			<div class="cai">用户手机：</div>
			<div class="input_find">
				<form action="${ctx}/user/userinfo" id="search" method="post"style="border:1px solid gray;">
					<table border="0" cellpadding="0" cellspacing="0"
						class="tab_search">
						<tr>
							<td><input type="text" name="phone" 
								class="searchinput"  />
							</td>
							<td><input type="image" width="21" height="17"
								class="searchaction" alt="Search" src="../image/magglass.gif"
								border="0" />
							</td>
						</tr>
					</table>
				</form>
			</div>
			<div class="zhuangtai">
				状态：<select id="status">
						<option value="-1">请选择</option>
						<option value="0">正常</option>
						<option value="1">黑名单</option>
					</select>
			</div>
			<div class="begin_time">
				<div class="demo1" style="width:100%;height:100%">
					<input class="laydate-icon" id="demo1" placeholder="此时间往后" style="position: relative;top:10px;"> 
				</div>
			</div>
			<div class="end_time">
				<div class="demo1" style="width:100%;height:100%">
					<input class="laydate-icon" id="demo2" placeholder="此时间之前" style="position: relative;top:10px;"/> 
				</div>
			</div>
			<input type="button" class="sousuo2" value="搜索">
		</div>
		<hr>
		<table  width="98%" height="auto"  cellspacing="0" cellpadding="0" border="1px" >
			<colgroup>
				<col width="15%">
				<col width="10%">
				<col width="20%">
				<col width="10%">
				<col width="8%">
				<col width="20%">
				<col width="5%">
			</colgroup>
			<tr align="center" class="tr1">
				<td>联系电话</td>
				<td>用户名</td>
				<td>邮箱</td>
				<td>生日</td>
				<td>性别</td>
				<td>注册时间</td>
				<td>状态</td>
				<td>操作</td>
			</tr>
			<c:if test="${not empty userall.rows}">
				<c:forEach var="x" items="${userall.rows}">
					<tr class="tr2" >
						<td>${x.phone}</td>
						<td>
							${x.useName}
						</td>
						<td >
							${x.email }
						</td>
						<td >
						<fmt:formatDate pattern="yyyy-MM-dd" 
						value="${x.birthday }" />
						</td>
						<td >
							<img class="imgSex" src="../image/girl.png" title="女" alt="状态" status="${x.sex }">
						</td>
						<td >
							<fmt:formatDate pattern="yyyy-MM-dd" 
            				value="${x.riqi }" />
						</td>
						<td class="status">
							<c:choose>
								<c:when test="${x.status==0 }">
									正常
								</c:when>
								<c:when test="${x.status==1 }">
									黑名单
								</c:when>
							</c:choose>
						</td>
						<td>
							<input type="hidden" class="phone" value="${x.phone }">
							<input class="shezhi" type="image" src="../image/heimingdan.png" title="加入黑名单" />
						</td>
					</tr>
				</c:forEach>
			</c:if>
		</table>
		<input type="hidden" id="total" value="${userall.total}">
		<jsp:include   page="pagination.jsp" flush="true"/>
<script type="text/javascript" src="../js/jquery-3.2.1.js"></script>
<script type="text/javascript" src="../js/calendar/laydate.js"></script>
<script type="text/javascript" src="../js/admin/user/userMange.js"></script>
<script src="../js/layer/layer.js" type="text/javascript"></script>
		<script type="text/javascript">
		!function(){
			laydate.skin('molv');
			laydate({elem: '#demo1'});
		}();!function(){
			laydate.skin('molv');
			laydate({elem: '#demo2'});
		}();
		var end = {
			    elem: '#demo2',
			    format: 'YYYY-MM-DD',
			    max: laydate.now(),
			    istime: true,
			    istoday: false,
			    choose: function(datas){
			        start.max = datas; //结束日选好后，充值开始日的最大日期
			    }
			};
			laydate(end);
		</script>
</body>
</html>